package com.stox.ui.javafx.core.widget;

import java.util.Locale;

import javafx.scene.control.TextField;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component
@Scope(value=ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class SearchTextField extends TextField {

	/*public SearchTextField() {
		setLeft(new ImageView("search.png"));
		Button previousButton = new Button();
		previousButton.setId("previous-button");
		setRight(new HBox(previousButton, new Button("b")));
	}*/
	
	@Autowired
	private void setMessageSource(MessageSource messageSource){
		setPromptText(messageSource.getMessage("Search", null, Locale.getDefault()));
	}
}
